﻿using AllInOne.Classes;
using HY.Common;
using PropertyChanged;
using System.Windows;
using System.Windows.Controls;

namespace AllInOne.Controls
{
    /// <summary>
    /// SetLocal.xaml 的交互逻辑
    /// </summary>
    [AddINotifyPropertyChangedInterface]
    public partial class SetOther : UserControl
    {
        public SetOther()
        {
            InitializeComponent();
            DataContext = this;
        }
        public string HideInnerButtonPage { get; set; } = INIHelper.Read("ALL", "HideInnerButtonPage");
        /// <summary>
        /// 隐藏阴极铜制卡页面操作
        /// </summary>
        public string HideYJTButtonPage { get; set; } = INIHelper.Read("ALL", "HideYJTButtonPage");

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            SystemParam.HideInnerButtonPage = HideInnerButtonPage == "True";
            SystemParam.HideYJTButtonPage = HideYJTButtonPage == "True";

            INIHelper.Write("ALL", "HideInnerButtonPage", HideInnerButtonPage);
            INIHelper.Write("ALL", "HideYJTButtonPage", HideYJTButtonPage);
            HandyControl.Controls.Growl.Info("保存成功");
        }
    }
}
